using System.Text.Json;
using System.Text.Encodings.Web;

namespace DidaManager.Models.JsonConvert
{
    /// <summary>
    /// JSON序列化全局配置管理类
    /// </summary>
    public static class JsonSerializerOptionsManager
    {
        /// <summary>
        /// 默认的JSON序列化配置
        /// </summary>
        public static readonly JsonSerializerOptions Default = new JsonSerializerOptions
        {
            WriteIndented = true,
            Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
            PropertyNamingPolicy = null
        };

        /// <summary>
        /// 紧凑格式的JSON序列化配置（不缩进）
        /// </summary>
        public static readonly JsonSerializerOptions Compact = new JsonSerializerOptions
        {
            WriteIndented = false,
            Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
            PropertyNamingPolicy = null
        };
    }
} 